-
Notifications
You must be signed in to change notification settings - Fork 21
Updates sdlscancode.inc and sdlkeycode.inc to 2.26.2 #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates sdlscancode.inc and sdlkeycode.inc to 2.26.2 #111
Conversation
Free-Pascal-meets-SDL-Website
commented
Jan 27, 2023
- updates sdlscancode.inc to version 2.26.2
- moves translated code from SDL_keycode.h from sdlscancode.inc into separate, new file sdlkeycode.inc
- updates sdlkeycode.inc to version 2.26.2
|
|
||
| const | ||
| SDLK_SCANCODE_MASK = 1 shl 30; | ||
| //#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we define this as a Pascal function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to keep it as is, because a function call has a little more overhead compared to just reading a constant value. Since scancodes may be requested in a large amount and rapidly, this means a large amount of function calls would result.
A second point why I opt'ed for keeping it as is, it saved some time :-).
Feel free to merge this if you approve my answer.